A virtual machine (VM) may be considered a simulation or software implementation of a physical machine (e.g., a computer) that executes programs like the physical machine. A computer system (e.g., a server) may often be configured to have multiple VMs, which may be managed by a virtual machine manager (VMM). The VMM, sometimes referred to as a hypervisor, has a supervisory role, such as assigning hardware resources to the VMs and relaying data traffic between the VMs and input/output (I/O) devices. Due to the increasing throughput of I/O devices, if all traffic goes through the VMM, the speed of the VMM may become a performance bottleneck. For example, a peripheral component interconnect express non-volatile memory (PCIe-NVM) device may now provide a throughput of more than 5 Gigabytes per second (GB/s). If a plurality of this type of I/O devices communicate with multiple VMs through a single VMM, the throughput of storage traffic may likely be limited by the VMM.
To cope with this challenge, server virtualization techniques such as single root I/O virtualization (SR-IOV) have been proposed and are being adopted in designing networking and/or storage controllers, such as network interface controller (NIC), converged network adapter (CNA), host bus adapter (HBA), and redundant array of independent disks (RAID) controller. SR-IOV may allow each VM to have direct access to hardware, such as NIC/CNA/HBA, in the form of a virtual function (VF). Thus, network and/or storage traffic may bypass the VMM and communicate between the memory of a VM and the NIC/CNA/HBA hardware directly. Bypassing the VMM may avoid memory copying between VMs and the VMM, thereby improving network throughput and lowering access latency. In today's storage devices, SR-IOV may only be supported when an internet small computer system interface (iSCSI) or fiber channel (FC) protocols are used.
NVM express (NVMe) may be considered a specification that defines a register interface for communicating with a PCIe-NVM subsystem. The specification also defines a standard command set for use with the PCIe-NVM subsystem. As of today, there may be no VMM supporting NVMe in SR-IOV mode, but it is anticipated that this may change soon as PCIe-NVM devices are being rapidly deployed in enterprise servers, e.g., due to their performance advantages over hard disk drives (HDDs). For example, random access performance of a PCIe-NVM may be up to 1000 times better than a HDD, and power consumption of the PCIe-NVM per input/output operations per second (IOPS) may be relatively lower.
However, before SR-IOV can be fully supported by NVMe PCIe-NVM devices, a few issues need to be addressed first. For example, there needs to be a mechanism for allocating NVMe PCIe-NVM resources (e.g., storage capacity) to each of the VMs. For another example, there needs to be a mechanism to isolate data and/or resources among VMs, so that a given VM may only be able to access data and/or resources assigned to itself, and not data or resources assigned to another VM.